package org.example.myleet.p564;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue("121".equals(solution.nearestPalindromic("123")));
        Assert.isTrue("0".equals(solution.nearestPalindromic("1")));
        Assert.isTrue("12921".equals(solution.nearestPalindromic("12932")));
        Assert.isTrue("99799".equals(solution.nearestPalindromic("99800")));
        Assert.isTrue("12121".equals(solution.nearestPalindromic("12120")));
        Assert.isTrue("1221".equals(solution.nearestPalindromic("1234")));
        Assert.isTrue("1001".equals(solution.nearestPalindromic("999")));
        Assert.isTrue("10001".equals(solution.nearestPalindromic("9999")));
        Assert.isTrue("999".equals(solution.nearestPalindromic("1000")));
    }
}
